<div class="m-tab s-tab">
	<h2 class="u-tt">用户组管理</h2>
	<ul>
		<li><a href="{$url|'UserGroup/index'}">用户组列表</a></li>
		<li class="z-crt"><a href="javascript:;">{$actionName}用户组</a></li>
	</ul>
</div>
<div class="m-form">
	<form name="" action="<?php echo url('UserGroup/'.$action.'Data'); ?>" method="post" id="form">
		<fieldset>
			<div class="formitm">
				<label class="lab">用户组名称：</label>
				<div class="ipt">
					<input name="name" type="text" class="u-ipt u-ipt-5" id="name" value="{$info.name}" maxlength="2" datatype="s2-18" errormsg="用户名至少2个字符,最多18个字符！" />
					<p></p>
				</div>
			</div>
			<div class="formitm">
				<label class="lab">等级：</label>
				<div class="ipt">
					<input name="level" type="text" class="u-ipt u-ipt-2" id="level" value="{$info.level}" maxlength="3" datatype="n" errormsg="等级只能为数字！" />
					<span class="suffix">你能创建用户组的最高等级为 {$userInfo.group_level}</span> 
					<p></p>
				</div>
			</div>
			<div class="formitm">
				<label class="lab">状态：</label>
				<div class="ipt">
				<!--{if="!isset($info['status'])"}-->{$info.status=1}<!--{/if}-->
				<!--{if="$info['status']"}-->
				  <label class="u-opt"><input name="status" type="radio" checked="checked" value="1" />启用</label>
				  <label class="u-opt"><input name="status" type="radio" value="0" />禁用</label>
				<!--{else}-->
					<label class="u-opt"><input name="status" type="radio" value="1" />启用</label>
				  	<label class="u-opt"><input name="status" type="radio" checked="checked" value="0" />禁用</label>
				<!--{/if}-->
				</div>
			  </div>
			<div class="formitm">
				<label class="lab">后台组：</label>
				<div class="ipt">
				<!--{if="$info['admin']"}-->
				  <label class="u-opt"><input name="admin" type="radio" checked="checked" value="1" />启用</label>
				  <label class="u-opt"><input name="admin" type="radio" value="0" />禁用</label>
				<!--{else}-->
					<label class="u-opt"><input name="admin" type="radio" value="1" />启用</label>
				  	<label class="u-opt"><input name="admin" type="radio" checked="checked" value="0" />禁用</label>
				<!--{/if}-->
				</div>
			  </div>
			
			<div class="formitm formitm-1  formitm-2">
				<input name="group_id" type="hidden" value="{$info.group_id}" />
				<button class="u-btn" type="submit">保存</button>
				<button class="u-btn s-btn-c3" type="reset">重置</button>
				<span class="status" id="status"></span> </div>
		</fieldset>
	</form>
</div>
<script>
Do.ready('base','form','dialog',function() {
	$('#form').duxForm({returnUrl:'{$url|"UserGroup/index"}'});
});
</script>